package com.remrbs.controller;

import com.remrbs.Vo.ResultVo;
import com.remrbs.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/User")
public class UserController {

    @Autowired
    private UserService userService;

    /**
     * 个人信息回显
     * @param id
     * @return
     */
    @GetMapping("/getUser")
    public ResultVo getUser(Integer id){
        return userService.selectByPrimaryKey(id);
    }

    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    @PostMapping("/login")
    public ResultVo login(String username,String password){
        return userService.login(username,password);
    }




}
